<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <p>welcome to FastApi Index</p>

    <p> {{name}} </p>

    <h1> todos: </h1>
    <p> {{todos}} </p>

    <h1> todos: 嵌入py代码 </h1>

    {% for todo in todos %}\
        <p> {{todo}} <p>
        <p> {{todo.content}} <p>
    {% endfor %}

    <div>
        <form action="/add_todo" method="post">
            <input name="content" placeholder="pls input todos here">
            <input type="submit" value="add">
        </form>
    </div>

    <hr>

    <div>
        <form action="/search" method="post">
            <input name="keyword" placeholder="pls input">
            <input type="submit" value="search">
        </form>
    </div>

</body>
</html>